//
//  UIView+LPPFrame.m
//  Lottery
//
//  Created by 刘盼 on 16/1/24.
//  Copyright © 2016年 lhheh. All rights reserved.
//

#import "UIView+LPPFrame.h"

@implementation UIView (LPPFrame)

-(void)setX:(CGFloat)x {
    
    CGRect Frame = self.frame;
    
    Frame.origin.x = x;
    
    self.frame = Frame;
}

-(CGFloat)x {
    
    return self.frame.origin.x;
}

-(void)setY:(CGFloat)y{
  
    CGRect Frame = self.frame;
    
    Frame.origin.y = y;
    
    self.frame = Frame;
}

-(CGFloat)y {
    
    return self.frame.origin.y;
}

-(void)setWidth:(CGFloat)width {
    
   CGRect Frame = self.frame;
    
    Frame.size.width = width;
    
    self.frame = Frame;
    
}

-(CGFloat)width {
    
    return self.frame.size.width;
}

-(void)setHeight:(CGFloat)height {
   
    CGRect Frame = self.frame;
    
    Frame.size.height = height;
    
    self.frame = Frame;
}

-(CGFloat)height {
    
    return self.frame.size.height;
}

-(void)setSize:(CGSize)size {
    
    CGRect Frame = self.frame;
    
    Frame.size = size;
    
    self.frame = Frame;
}

-(CGSize)size {
    
    return CGSizeMake(self.width, self.height);
}

-(void)setOrigin:(CGPoint)origin {
    
    CGRect Frame = self.frame;
    
    Frame.origin = origin;
    
    self.frame = Frame;
}

-(CGPoint)origin {
    
    return CGPointMake(self.x, self.y);
}
@end
